sayHi = (arg) -> 'Hi ' + arg

window.doWork = ->
    $.work(sayHi, 'Guirec')
        .then((data) -> alert data)
        .fail((data) -> alert 'oops' + data)

